/*
 * @Author: yushuang
 * @Date: 2024-12-17 17:25:56
 * @LastEditors: yushuang
 * @LastEditTime: 2025-02-10 17:11:00
 * @Description:
 */
import router from '@/router';
import { setRouteEmitter } from '@/utils/route-listener';
import { useLoadingCheck, useScrollToTop } from '@/composables/loading';

router.beforeEach(async (to, _, next) => {
  setRouteEmitter(to);
  next();
});

router.afterEach(() => {
  useLoadingCheck();
  useScrollToTop();
});
